package ${domain}.module.wsys.req;

import ${domain}.frame.validation.Select;
import ${domain}.frame.base.BaseRequest;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

/**
 * FileCreateRequest - 文件新增
 *
 * @author wangbing
 * @version 0.0.1
 * @since 2017-01-01
 */
public class FileCreateRequest extends BaseRequest {

    /**
     * 文件名称
     */
    @NotBlank(message = "[name]文件名称不能为空")
    @Length(min = 0, max = 255, message = "文件名称长度不合法(0-255)")
    private String name;

    /**
     * 文件类型.
     * IMG:图片
     * DOC:文档
     */
    @Select({"IMG", "DOC"})
    private String fileType;

    /**
     * 扩展属性1
     */
    @Length(min = 0, max = 50, message = "[attribute1]扩展属性1长度不合法(0-50)")
    private String attribute1;

    /**
     * 扩展属性2
     */
    @Length(min = 0, max = 50, message = "[attribute2]扩展属性2长度不合法(0-50)")
    private String attribute2;

    /**
     * 存放地址
     */
    @Length(min = 0, max = 500, message = "[location]存放地址长度不合法(0-500)")
    private String location;

    /**
     * 访问地址
     */
    @Length(min = 0, max = 500, message = "访问地址长度不合法(0-500)")
    private String url;

    /**
     * 下载地址
     */
    @Length(min = 0, max = 500, message = "[urlDownload]下载地址长度不合法(0-500)")
    private String urlDownload;

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFileType() {
        return this.fileType;
    }

    public void setFileType(String fileType) {
        this.fileType = fileType;
    }

    public String getAttribute1() {
        return this.attribute1;
    }

    public void setAttribute1(String attribute1) {
        this.attribute1 = attribute1;
    }

    public String getAttribute2() {
        return this.attribute2;
    }

    public void setAttribute2(String attribute2) {
        this.attribute2 = attribute2;
    }

    public String getLocation() {
        return this.location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUrlDownload() {
        return this.urlDownload;
    }

    public void setUrlDownload(String urlDownload) {
        this.urlDownload = urlDownload;
    }
}
